<?php defined('BASEPATH') OR exit('No direct script access allowed');

class Comments extends Admin_Controller
{
    function __construct ()
    {
        parent::__construct();
        $this->load->model('shop_m');
        $this->load->model('user_m');
        $this->load->model('comments_m');
        $this->load->model('uservouchers_m');
        $this->load->model('goodvouchers_m');
        $this->load->model('category_m');
        $this->load->model('order_m');
    }
    /**
     * 列表
     * [index description]
     * @return [type] [description]
     */
    public function index()
    {
        $comments = $this->comments_m->get_all_comments();
        if($comments){
            foreach ($comments as $k => $v) {
                $shopinfo = $this->shop_m->get_shop_user_by_id($val['shop_id']);
                $userinfo = $this->user_m->get_user_by_user_id($val['user_id']);
                $comments[$k]['good_title'] = $shopinfo['good_title'];
            }
        }
        $data['comments'] = $comments;
        $this->load->view('comments/index',$data);
    }
    
    
}
